import openSocket from 'socket.io-client';
const socket = openSocket('http://hd.lijag.cn:8000');

// cbs 就是回调函数数组
const startRealTime = cbs => {
  cbs.forEach( el => {
    socket.on( el.event , data => el.fn(data) );
  } );


  socket.emit('startRealTime');
};

export default startRealTime;

